package com.hsd.znsh.pojo.query;

import com.hsd.znsh.entity.User;
import com.hsd.znsh.enums.DeletedStatusEnum;
import com.hsd.znsh.hql.*;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/*
 * @auther: wangjiacai
 *
 * @create: 2018-04-23 15:48:06
 */
@Data
@ClassName(User.class)
public class UserQuery {

    private String username;

    private String phone;

    private String email;

    @Equal
    private Integer userType;

    private String hIKUsername;

    @Ignore
    private String createUsername;

    @In(column = "createUserId")
    private List<Integer> createUserIds;

    @Or
    @Null
    @Equal
    private Integer createUserId;

    @Great(column = "createDateTime")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date startTime;

    @Less(column = "createDateTime")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endTime;

    @Equal
    private Integer deleted= DeletedStatusEnum.NOT_DELETED.getCode();
}
